<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .father {
      width: 500px;
      height: 500px;
      background-color: #ccc;
    }

    .son1 {
      width: 400px;
      height: 400px;
      background-color: red;
    }

    .a {
      width: 300px;
      height: 300px;
      background-color: skyblue;
    }
  </style>
</head>

<body>
  <div class="father">
    <div class="son1">
      123
      <div class="a">
        2222222222
      </div>
    </div>
  </div>
  <button id="btn">点击</button>
  <script>
    let f = document.getElementsByClassName('father')
    let s = document.getElementsByClassName('son1')
    let a = document.getElementsByClassName('a')
    console.log(f);

    f[0].addEventListener('click', function (e) {
      let node = e.target
      console.log(node);
      console.log(node.innerText);

    })
    document.getElementById('btn').onclick = function (e, a) {
      console.log(e);
      console.log(a);

    }
  </script>
</body>

</html>